﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace ZYing.LiquidThemeEngine.FileProviders
{
    public interface ILiquidThemeFileInfo
    {
        /// <summary>
        /// True if resource exists in the underlying storage system.
        /// </summary>
        bool Exists { get; }
        /// <summary>
        /// True for the case TryGetDirectoryContents has enumerated a sub-directory
        /// </summary>
        bool IsDirectory { get; }
        /// <summary>
        /// The length of the file in bytes, or -1 for a directory or non-existing files.
        /// </summary>
        long Length { get; }
        /// <summary>
        ///  The name of the file or directory, not including any path.
        /// </summary>
        string Name { get; }
        /// <summary>
        /// When the file was last modified
        /// </summary>
        DateTimeOffset LastModified { get; }
        /// <summary>
        /// Return file contents as readonly stream. Caller should dispose stream when complete.
        /// </summary>
        /// <returns></returns>
        Stream CreateReadStream();
    }
}